import { ResouceConst } from "../../../../component/gconst/ResouceConst";
import { ImagesConst } from "../../../resource/ImagesConst";
import { FilterConst } from "../../../../component/gconst/FilterConst";
import { Language } from "../../../../../extend/language/Language";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ScaleBitmap } from "../../../../../com/mui/display/ScaleBitmap";
type int = number;
//class WelfareItem
    
    export  class WelfareItem /* flash.display.Sprite */
    {
        constructor()
        {
            
            this._titleHeight = 25;
            this.initUI();
            return;
        }

        protected initUI(): void
        {
            this._titleBg = ResouceConst.getScaleBitmap(ImagesConst.FightingStrgBg);
            this._titleBg.width = this.width - 80;
            this._titleBg.height = this._titleHeight;
            this._titleBg.x = (this.width - this._titleBg.width) / 2;
            addChild(this._titleBg);
            this._titleTxt = new Object /* flash.text.TextField */();
            this._titleTxt.autoSize = flash.text.TextFieldAutoSize.CENTER;
            this._titleTxt.width = this.width;
            this._titleTxt.height = 20;
            this._titleTxt.textColor = 16776960;
            this._titleTxt.filters = [FilterConst.glowFilter];
            this._titleTxt.mouseEnabled = false;
            this._titleTxt.x = this.width / 2;
            this._titleTxt.y = 4;
            this._titleTxt.text = Language.getString(20560);
            addChild(this._titleTxt);
            this._bg = ResouceConst.getScaleBitmap(ImagesConst.DisabledBg);
            this._bg.setSize(this.width, this.height - this._titleHeight - 2);
            this._bg.x = 0;
            this._bg.y = this._titleHeight + 2;
            addChild(this._bg);
            this._titleBg2 = GlobalClass.getScaleBitmap(ImagesConst.TileBg);
            this._titleBg2.width = this.width - 70;
            this._titleBg2.height = 22;
            this._titleBg2.x = 0;
            this._titleBg2.y = this._bg.y + 1;
            addChild(this._titleBg2);
            this._titleTxt2 = new Object /* flash.text.TextField */();
            this._titleTxt2.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._titleTxt2.width = this.width;
            this._titleTxt2.height = 20;
            this._titleTxt2.textColor = GlobalStyle.color2Uint;
            this._titleTxt2.filters = [FilterConst.glowFilter];
            this._titleTxt2.mouseEnabled = false;
            this._titleTxt2.x = 5;
            this._titleTxt2.y = this._titleBg2.y + 2;
            this._titleTxt2.text = Language.getString(20561) + "：";
            addChild(this._titleTxt2);
            return;
        }

        public /* override */ get width(): number
        {
            return 225;
        }

        public /* override */ get height(): number
        {
            return 196;
        }

        protected /* var */_titleBg: ScaleBitmap;

        protected /* var */_titleTxt: Object /* flash.text.TextField */;

        protected /* var */_bg: ScaleBitmap;

        protected /* var */_titleBg2: Object /* flash.display.Bitmap */;

        protected /* var */_titleTxt2: Object /* flash.text.TextField */;

        protected /* var */_titleHeight: int;
    }
